{% extends 'base.html' %}

{% block content %}


<div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins" id="all">
                <div class="ibox-title">
                    <h5> 主机详细信息列表</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <i class="fa fa-wrench"></i>
                        </a>
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form id="asset_form">

                        <table class="table table-striped table-bordered table-hover " id="editable" name="editable">
                            <thead>
                                <tr>
                                    <th class="text-center">
                                        <input id="checkall" type="checkbox" class="i-checks" name="checkall" value="checkall" data-editable='false' onclick="check_all('asset_form')">
                                    </th>
                                    <th class="text-center"> 主机名 </th>
                                    <th class="text-center"> 主机类型 </th>
                                    <th class="text-center"> 操作系统 </th>
                                    <th class="text-center"> cpu核数 </th>
                                    <th class="text-center"> 内存 </th>
                                    <th class="text-center" name="ip"> 内网IP </th>
                                    <th class="text-center" name="ip"> 外网IP </th>
                                </tr>
                            </thead>
                            <tbody>
                            {% for asset in asset_list %}
                                <tr class="gradeX">
                                    <td class="text-center" name="id" value="{{ asset.id }}" data-editable='false'>
                                        <input name="id" value="{{ asset.id }}" type="checkbox" class="i-checks">
                                    </td>
                                    <td class="text-center hostname">{{ asset.hostname }}</td>
                                    <td class="text-center">{{ asset.asset_type }}</td>
                                    <td class="text-center">{{ asset.system_type }}</td>
                                    <td class="text-center"> {{ asset.cpu }} </td>
                                    <td class="text-center"> {{ asset.memory }}</td>
                                    <td class="text-center"> {{ asset.ip }} </td>
                                    <td class="text-center"> {% if asset.wan_ip %}{{ asset.wan_ip }}{% endif %}</td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}


